window.addEventListener('load', (event) => { console.log('page is fully loaded'); });
window.onload = function() { // Some code };